<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>测试</title>
    <style>
        .test1 {
            width: 800px;
            height: 300px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: repeat(4, 150px);
            grid-template-rows: repeat(3, 80px);
            grid-gap: 10px;
        }

        .test2{
            display: flex;
            align-items: center;
            justify-content: center;
            background-color: lightgray;
            border: 1px solid black;
        }

        .test3{
            max-width: 100%;
            max-height: 100%;
            object-fit: cover;
        }

        .test4 {
            grid-column: span 2;
            grid-row: span 2;
        }
    </style>
</head>
<body>
<div class="test1">
    <div class="test2"><img src="image1.jpg" alt="Image 1"></div>
    <div class="test2"><img src="image2.jpg" alt="Image 2"></div>
    <div class="test2  test3 test4"><img src="image3.jpg" alt="Image 3"></div>
    <div class="test2 "><img src="image4.jpg" alt="Image 4"></div>
    <div class="test2"><img src="image5.jpg" alt="Image 5"></div>
    <div class="test2"><img src="image6.jpg" alt="Image 6"></div>
    <div class="test2"><img src="image7.jpg" alt="Image 7"></div>
    <div class="test2"><img src="image8.jpg" alt="Image 8"></div>
    <div class="test2"><img src="image9.jpg" alt="Image 9"></div>
</div>
</body>
</html>